﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Arthus
{
    public partial class podesavanjaForma : Form
    {
        public podesavanjaForma()
        {
            InitializeComponent();
            label6.Text = "Napomena o poreskom\n oslobođenju:";
            textBoxGodina.Text = Properties.Settings.Default.Godina;
            textBoxMestoIzdavanjaRacuna.Text = Properties.Settings.Default.MestoIzdavanjaRacuna;
            textBoxMestoPrometaDobara.Text = Properties.Settings.Default.MestoPrometaDobara;
            textBoxOdgovornoLice.Text = Properties.Settings.Default.OdgovornoLice;
            textBoxOdgovornoLice2.Text = Properties.Settings.Default.OdgovornoLice2;
            textBoxNapomenaOPoreskomOslobodjenju.Text = Properties.Settings.Default.NapomenaOPoreskomOslobodjenju;
            textBoxNacinIsporuke.Text = Properties.Settings.Default.NacinIsporuke;
            textBoxNapomena.Text = Properties.Settings.Default.Napomena;
            textBoxNapomena2.Text = Properties.Settings.Default.Napomena2;
        }

        private void buttonZatvori_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void buttonSacuvaj_Click(object sender, EventArgs e)
        {
            Properties.Settings.Default.Godina = textBoxGodina.Text;
            Properties.Settings.Default.MestoIzdavanjaRacuna = textBoxMestoIzdavanjaRacuna.Text;
            Properties.Settings.Default.MestoPrometaDobara = textBoxMestoPrometaDobara.Text;
            Properties.Settings.Default.OdgovornoLice = textBoxOdgovornoLice.Text;
            Properties.Settings.Default.OdgovornoLice2 = textBoxOdgovornoLice2.Text;
            Properties.Settings.Default.NapomenaOPoreskomOslobodjenju = textBoxNapomenaOPoreskomOslobodjenju.Text;
            Properties.Settings.Default.NacinIsporuke = textBoxNacinIsporuke.Text;
            Properties.Settings.Default.Napomena = textBoxNapomena.Text;
            Properties.Settings.Default.Napomena2 = textBoxNapomena2.Text;
            Properties.Settings.Default.Save();
            MessageBox.Show("Podaci su sačuvani!");
        }
    }
}
